package com.ktwlsoft.archivemanage.domain.dao.entity;

import com.ktwlsoft.archivemanage.service.utils.SnowFlake;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 通知管理
 */
@Setter
@Getter
public class NotifyMessage {

    private Long id = SnowFlake.getNextId();

    /**通知时间*/
    private Date notifyDate = new Date();

    /**业务id*/
    private Long businessId;

    /**归属业务（MEND(检查整改), ANNUAL_REPORT(年度报送),BUSINESS_INSPECT(业务检查),BUSINESS_GUIDANCE(业务指导)）*/
    private BelongBusiness belongBusiness;

    /**归属系统*/
    private BelongSystem belongSystem = BelongSystem.ARCHIVE_BUSINESS_INSTRUCTION_SYSTEM;

    /**提醒类型*/
    private RemindType remindType;

    /**其他信息*/
    private String otherContent;

    /**是否已读*/
    private Integer consumed;

    /**相关人*/
    private String relatePerson;

    /**相关人id*/
    private Long relatePersonId;

    /**消息主体*/
    private String mainBody;

    /**消息主体id*/
    private Long mainBodyId;

    /**0:管理PC端, 5用户Mini端, 6用户PC端*/
    private Integer export;

    /**消息类型:0.所有,1.抄送*/
    private Integer messageType;

    /**检查类型:default(默认),self_or_repeat(自查复查)**/
    private String inspectType;

    public NotifyMessage(){}

    public NotifyMessage(Long id, Date notifyDate, Long businessId, BelongBusiness belongBusiness,
                         BelongSystem belongSystem, RemindType remindType, String otherContent,
                         Integer consumed, String relatePerson, Long relatePersonId, String mainBody,
                         Long mainBodyId, Integer export,Integer messageType) {
        this.id = id;
        this.notifyDate = notifyDate;
        this.businessId = businessId;
        this.belongBusiness = belongBusiness;
        this.belongSystem = belongSystem;
        this.remindType = remindType;
        this.otherContent = otherContent;
        this.consumed = consumed;
        this.relatePerson = relatePerson;
        this.relatePersonId = relatePersonId;
        this.mainBody = mainBody;
        this.mainBodyId = mainBodyId;
        this.export = export;
        this.messageType = messageType;
    }



    public enum BelongSystem{
        /**
         * 档案业务检查系统
         */
        ARCHIVE_BUSINESS_INSTRUCTION_SYSTEM("档案业务指导服务系统");

        @Getter
        private String chName;

        @Getter
        private String enName;

        BelongSystem(String chName){
            this.chName = chName;
            this.enName = this.toString();
        }
    }

    public enum BelongBusiness{
        /**
         * 检查整改
         */
        MEND("检查整改"),

        MEND_NO("检查整改未验证"),

        GUI_MEND("指导整改"),

        GUI_MEND_NO("指导整改未验证"),

        ANNUAL_REPORT("年度报送"),

        ANNUAL_REPORT_NO("年度报送未验证"),

        GUIDANCE_APPLY("指导申请"),

        GUIDANCE_APPLY_NO("指导申请未验证"),

        BUSINESS_INSPECT("业务检查"),

        REGISTER_SAVE("立档单位注册"),

        BUSINESS_GUIDANCE("业务指导");

        @Getter
        private String chName;

        @Getter
        private String enName;

        BelongBusiness(String name){
            this.chName = name;
            this.enName = this.toString();
        }
    }

    public enum RemindType{
        /**
         * 检查整改未提交提醒
         */
        MEND_UNCOMMIT("检查整改未提交提醒"),

        MEND_COMMIT("检查整改已提交提醒"),

        /**指导整改*/
        GUI_MEND_UNCOMMIT("指导整改未提交提醒"),

        GUI_MEND_COMMIT("指导整改已提交提醒"),

        ADD_MEND_LIST("新增指导整改提醒"),

        GUI_MEND_LIST_VERIFY("指导整改验证未通过提醒"),

        GUI_MEND_LIST_PASS("指导整改验证通过提醒"),
        /**
         * 年度报送未提交提醒
         */
        ANNUAL_REPORT_UNCOMMIT("年度报送未提交提醒"),

        ANNUAL_REPORT_CONFIG("年度报送设置提醒"),

        ANNUAL_REPORT_VERIFYCONFIRM("年度报送验证提醒"),

        ANNUAL_REPORT_COMMIT("年度报送已提交提醒"),

        ANNUAL_REPORT_UNPASS("年度整改未通过提醒"),

        ANNUAL_REPORT_PASS("年度整改通过提醒"),

        BUSINESS_INSPECT("业务检查提醒"),

        MEND_LIST_ADD("新增检查整改提醒"),

        MEND_LIST_UNPASS("检查整改未通过提醒"),

        MEND_LIST_PASS("检查整改通过提醒"),

        BUSINESS_GUIDANCE("新增业务指导提醒"),

        REGISTER_SAVE("新增立档单位注册提醒"),

        GUIDANCE_APPLY_COMMIT("指导申请提交");

        @Getter
        private String chName;

        @Getter
        private String enName;

        RemindType(String chName){
            this.chName = chName;
            this.enName = this.toString();
        }
    }
}